
local mt = ac.skill['攻击计数']
mt.passive = 1
mt.art = [[ReplaceableTextures\CommandButtons\BTNOrbOfLightning.blp]]
mt.cool = 0     --触发冷却
mt.count = 1   --触发次数
mt.cost = 0     --魔法消耗


function mt:on_add()
    local hero = self.owner
    local count = 0
    self:notify('on_init',hero)
    self:gc(hero:event '单位-攻击命中'(function(_,_,target)
        if not self:is_cooling() and count>=self.count then
            self:active_cd()
            self:notify('on_run',hero,target)
            count = 0
        else
            count = count + 1
        end
    end))
end
